package com.simplefaith.delisty.client.packet.handler;

import java.util.HashMap;
import java.util.Map;

import com.simplefaith.delisty.client.packet.ClientPacket;

public abstract class PacketHandler {

	private final int opCode;

	public int getOpCode() {
		return opCode;
	}

	private Map<Integer, ClientPacket> packetHandlerMaps;

	public PacketHandler(int opCode) {
		this.opCode = opCode;
		packetHandlerMaps = new HashMap<Integer, ClientPacket>();
	}

	public void putPacket(int key, ClientPacket value) {
		packetHandlerMaps.put(key, value);
	}

	public ClientPacket getPacket(int key) {
		return packetHandlerMaps.get(key);
	}

	public abstract void ReceivePacket(String msg);

	public abstract void HandlePacket(ClientPacket clientPacket);

}
